/*测试if-else双分支*/
public class TestIf02 {
    public static void main(String[] args){
        double r = 4*Math.random();
        double area = 3.14*r*r;
        double circle = 2*Math.PI*r;
        System.out.println("半径r："+r);
        System.out.println("面积为："+area);
        System.out.println("周长为："+circle);

        if(area>=circle){
            System.out.println("面积数值大于周长");
        }else {
            System.out.println("面积数字小于周长");
        }
        int a = 3,b=4;
        int c = a<b?b:a;
        System.out.println(c);

        if(a<b){
            System.out.println(b);
        }else {
            System.out.println(a);
        }
    }
}
